<?php
   session_start(); 
      if ($_REQUEST['host']) {
      $_SESSION['host'] =  $_REQUEST['host'];
      }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <link rel="stylesheet" type="text/css" href="iphone.css" title="style" />
    <link rel="stylesheet" type="text/css" href="google.css" title="style" />
    <script type="text/javascript" src="lib/prototype.js"></script>
    <script type="text/javascript" src="lib/scriptaculous.js"></script>
    <script type="text/javascript" src="server.js"></script>
    <script type="text/javascript" src="google.js"></script>
  </head>
  <body>
    <div id="site">


      <?php
         function button($icon,$name=null) {
         if ($name == null) $name = $icon;
         echo '<span class="b">';
         echo '<a border="0" href="#" onclick="google' . $name . '(); return false">';
         echo '<img border="0" src="icons/' . $icon . '.png"></a>';
         echo '</span>';
         echo "\n";
         }
         ?>

      <p>

        <?php 
           button('Safari','Browser');
           button('Calendar');
           button('Stocks');
           ?>
        <br/>
        <?php 
           button('Maps');
           button('Photos');
           button('Notes','Reader');
           ?>
        <br/>

        <?php 
           button('YouTube');
           button('Mail');
           button('Weather');
           ?>

      </p>

      <div class="clear"></div>
      <br/>
      <br/>
      <br/>
      <br/>
    <?php include 'host.php'; ?>

      <div id="mainJS">
        <!-- the communication is done here -->
      </div>

    </div>
  </body>
</html>

